{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Highcharts Demos\n",
    "=========\n",
    "3D donut: http://www.highcharts.com/demo/3d-pie-donut\n",
    "--------------------------------------------------"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<iframe style=\"border:0;outline:none;overflow:hidden\" srcdoc=\"&lt;!DOCTYPE html&gt;\n",
       "&lt;html lang=&quot;en&quot;&gt;\n",
       "    &lt;head&gt;\n",
       "        &lt;meta charset=&quot;utf-8&quot; /&gt;\n",
       "        &lt;link href=&quot;https://www.highcharts.com/highslide/highslide.css&quot; rel=&quot;stylesheet&quot; /&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&quot;&gt;&lt;/script&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://code.highcharts.com/highcharts.js&quot;&gt;&lt;/script&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://code.highcharts.com/highcharts-more.js&quot;&gt;&lt;/script&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;https://code.highcharts.com/modules/exporting.js&quot;&gt;&lt;/script&gt;\n",
       "        &lt;script type=&quot;text/javascript&quot; src=&quot;http://code.highcharts.com/highcharts-3d.js&quot;&gt;&lt;/script&gt;\n",
       "    &lt;/head&gt;\n",
       "    &lt;body style=&quot;margin:0;padding:0&quot;&gt;\n",
       "                &lt;div id=&quot;container&quot; style=&quot;width:550px;height:400px;&quot;&gt;Loading....&lt;/div&gt;\n",
       "\n",
       "\n",
       "    &lt;script&gt;\n",
       "        $(function(){\n",
       "\n",
       "\n",
       " \n",
       "\n",
       "\n",
       "\n",
       "\n",
       "            Highcharts.setOptions({&quot;lang&quot;: {}, &quot;global&quot;: {}});\n",
       "            var option = {&quot;loading&quot;: {}, &quot;subtitle&quot;: {&quot;text&quot;: &quot;3D donut in Highcharts&quot;}, &quot;xAxis&quot;: {}, &quot;title&quot;: {&quot;text&quot;: &quot;Contents of Highsoft&#x27;s weekly fruit delivery&quot;}, &quot;series&quot;: {}, &quot;labels&quot;: {}, &quot;yAxis&quot;: {}, &quot;chart&quot;: {&quot;width&quot;: 550, &quot;options3d&quot;: {&quot;alpha&quot;: 45, &quot;enabled&quot;: true}, &quot;renderTo&quot;: &quot;container&quot;, &quot;type&quot;: &quot;pie&quot;, &quot;height&quot;: 400}, &quot;tooltip&quot;: {}, &quot;plotOptions&quot;: {&quot;pie&quot;: {&quot;innerSize&quot;: 100, &quot;depth&quot;: 45}}, &quot;credits&quot;: {&quot;enabled&quot;: false}, &quot;colors&quot;: {}, &quot;pane&quot;: {}, &quot;exporting&quot;: {}, &quot;drilldown&quot;: {}, &quot;navigation&quot;: {}, &quot;legend&quot;: {}};\n",
       "\n",
       "\n",
       "            var data = [{&quot;data&quot;: [[&quot;Bananas&quot;, 8], [&quot;Kiwi&quot;, 3], [&quot;Mixed nuts&quot;, 1], [&quot;Oranges&quot;, 6], [&quot;Apples&quot;, 8], [&quot;Pears&quot;, 4], [&quot;Clementines&quot;, 4], [&quot;Reddish (bag)&quot;, 1], [&quot;Grapes (bunch)&quot;, 1]], &quot;type&quot;: &quot;pie&quot;, &quot;name&quot;: &quot;Delivered amount&quot;}]\n",
       "            option.series = data;\n",
       "\n",
       " \n",
       "\n",
       "            var chart = new Highcharts.Chart(option);\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       " \n",
       "\n",
       "\n",
       "        \n",
       "    });\n",
       "        &lt;/script&gt;\n",
       "\n",
       "    &lt;/body&gt;\n",
       "&lt;/html&gt;\" height=400 width=550></iframe>"
      ],
      "text/plain": [
       "<highcharts.highcharts.highcharts.Highchart at 0x7f90c4136b90>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from highcharts import Highchart\n",
    "H = Highchart(width=550, height=400)\n",
    "\n",
    "options = {\n",
    "    'chart': {\n",
    "        'type': 'pie',\n",
    "        'options3d': {\n",
    "            'enabled': True,\n",
    "            'alpha': 45\n",
    "        }\n",
    "    },\n",
    "    'title': {\n",
    "        'text': \"Contents of Highsoft\\'s weekly fruit delivery\"\n",
    "    },\n",
    "    'subtitle': {\n",
    "        'text': '3D donut in Highcharts'\n",
    "    },\n",
    "    'plotOptions': {\n",
    "        'pie': {\n",
    "            'innerSize': 100,\n",
    "            'depth': 45\n",
    "        }\n",
    "    },\n",
    "}\n",
    "\n",
    "data = [\n",
    "    ['Bananas', 8],\n",
    "    ['Kiwi', 3],\n",
    "    ['Mixed nuts', 1],\n",
    "    ['Oranges', 6],\n",
    "    ['Apples', 8],\n",
    "    ['Pears', 4],\n",
    "    ['Clementines', 4],\n",
    "    ['Reddish (bag)', 1],\n",
    "    ['Grapes (bunch)', 1]\n",
    "]\n",
    "\n",
    "H.set_dict_options(options)\n",
    "H.add_data_set(data, 'pie', 'Delivered amount')\n",
    "\n",
    "H"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
